package project.adapter;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import approve.action.R;
import project.model.PrComposition;

public class Projectdetail_info_adapter_tc extends BaseAdapter {

	private Context context;
	private List<PrComposition> listemploy;
	
	public Projectdetail_info_adapter_tc(Context context,List<PrComposition> listemploy){
		this.context=context;
		this.listemploy=listemploy;
	}
	public int getCount() {
		// TODO Auto-generated method stub
		return listemploy.size();
	}

	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return listemploy.get(position);
	}

	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		PrComposition entry=listemploy.get(position);
		if(convertView==null){
			LayoutInflater inflater=(LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			convertView=inflater.inflate(R.layout.listemployee_row_tc, null);
		}
		TextView employeename=(TextView)convertView.findViewById(R.id.employeename);
		employeename.setText(entry.getNameEmployee());
		return convertView;
	}

}
